I understand it's an expression of agreement. What exactly does it mean and where did it originate from?
"I'm down with it" or more often "I'm down with that" is confirmation, acceptance as in "that's fine by me", or commitment. It's originally African American jazz slang from around 1935.
It was popular during the 1990s especially in rap and hip hop, also in the 1970s, and in jazz from the 1930s to at least the 1960s.
Webster's New World American Idioms Handbook (2011) says:
I'm down with that: slang; means “I'm agreeable to that”
A poster on Wordreference.com (2006) said:
In AAVE [African American Vernacular English] "I'm down" or "I'm down with that" can mean "I am in", I will commit to that action or position, or I am on your side.
Our Souls to Keep: Black/White Relations in America (1999) by George Henderson equates "I agree" with black English "right on" and "I'm down with that".
Law Enforcement Vocabulary (1973) by Julian A. Martin:
I'm Down With You. Juvenile slang: I'll fight on your side.
This version was used in Buffy The Vampire Slayer in 1998, showing overlap between being friends with someone or generally agreeable with them, and and described as mainstream slang in the book Slayer Slang: A Buffy the Vampire Slayer Lexicon (2004) by Michael Adams (first published online in 1999):
If Faith's Goth-chick slang veers towards the obscure, other characters favor the teen mainstream: ... "So, you're not down with Angel," she acknowledges of Spike, Angel's rival among Sunnydale vampires; ...
The American Heritage Dictionary of Idioms (1997) shows a slightly different use:
4. be or get down with. Be close friends with, as in I'm down with that crowd. [Slang; late 1900s]
From the introduction to A Jazz Lexicon (1964) by Robert S. Gold:
A few terms, perhaps because of their simplicity and widespread applicability, have survived from the early jazz life... The jazz slang speaker's aloofness is tacitly justified by his feeling that only those who are down with the action (aware of what is going on) should have access to the speech of those who have paid their dues (suffered an apprenticeship in life generally and in the jazz life in particular).
And its own entry (read online):
down with, [poss. from gambling slang to be down (i.e., to have one's bet placed) and poss. from general colloquial down to his toes (or socks); current esp. among Negro jazzmen since c. 1935] See 1957 and second 1959 quots. — 1944 Dan Burley's Original Handbook of Harlem Jive, p. 15. "I'm down with the action." — p. 41. Othello, the spade stud, pops in port, "down with it, cause he can't quit it." — p. 47. Iago is down with the action. — 1946 Really the Blues, p. 369. down with it: top-notch, superlative. — 1955 Down Beat, 5 Oct., p. 51. I don't know who the singer is, 'cause I'm not down with all the singers now. — 1957 The Book of Negro Folklore, p. 483. down with it: to get acquainted with, to understand. — 1959 Diggeth Thou?, p. 23. Let's see what's down with the deal. — 1959 Esquire, Nov., p. 70I. down with something, to be: to know something thoroughly. — 1960 Beat Jokes Bop Humor & Cool Cartoons, p. 57. The Ham wasn't down with the action.
From an interview with rapper Guru from Gang Starr in Blues & Soul magazine (1990):
"You see I'm down with anything that's about uplifting and giving self-esteem to the black man. You see the black man in cities in America, over here and around the world . . . they need self-esteem because a lot of them see it as society's so hard on them they can't get it together. What these religions are based on is building pride, awareness and knowledge of culture and self, and that is important. So, anything like that I'm down with. That's why I say 'I'm down with the Nation [of Islam]"
Ebony magazine (January 1976):
Buffalo's Randy Smith, a former NSSFNS recipient, said he was determined to make the tournament, with or without his club's blessings. "That's how most of the players felt," said Smith. "The tournament is designed to help black youngsters, and anytime there is something I can do to help the cause, hey, I'm down with it."
"Don't bet on that. Chumps like to deal with a winner, if you know what I mean. I'ma stone hustler. I'm down with it, dig? And he threatened me, even if it was with ...
From Mezz Mezzrow's autobiography Really the Blues (1946) , in a reference to jazz slang of the 1930s:
first cat: Hey there Poppa Mezz, is you anywhere?
me: Man I'm down with it, stickin' like a honky.
A translation of terms appears in the glossary:
Down with it: top-notch, superlative